/*
 * DefaultPanel.java
 *
 * Created on September 18, 2007, 3:57 PM
 */

package jia.editor;

import jia.editor.forms.DesignForm;
import jia.editor.forms.EventSequenceForm;

import jia.editor.lists.BackdropList;
import jia.editor.lists.BattleMapList;
import jia.editor.lists.CurrencyList;
import jia.editor.lists.EventList;
import jia.editor.lists.PantheonList;
import jia.editor.lists.PortraitList;
import jia.editor.lists.QuestList;
import jia.editor.lists.SkinList;
import jia.editor.lists.SpriteList;
import jia.editor.lists.pnl_CharacterList;
import jia.editor.lists.pnl_ClassesList;
import jia.editor.lists.pnl_CreatureList;
import jia.editor.lists.pnl_DietyList;
import jia.editor.lists.pnl_ItemList;
import jia.editor.lists.pnl_ModuleList;
import jia.editor.lists.pnl_NPCList;
import jia.editor.lists.pnl_RacesList;
import jia.editor.lists.pnl_SpellList;
import jia.editor.lists.pnl_WallList;
import jia.game.GenericFlags;
import jia.game.MainScreen;
import jia.tools.PanelSwapper;
import org.apache.log4j.Logger;



/**
 *
 * @author  estell
 */
public class DefaultPanel extends javax.swing.JPanel {
    private static final Logger log = Logger.getLogger(DefaultPanel.class);
    
    /** Creates new form DefaultPanel */
    public DefaultPanel() {
        
        initComponents();
    }
    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTextPane1 = new javax.swing.JTextPane();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        pnl_Editor = new javax.swing.JPanel();
        btn_QuestMenu = new javax.swing.JButton();
        btn_SelectDesign = new javax.swing.JButton();
        btn_EventMenu = new javax.swing.JButton();
        btn_BattleMapEditor = new javax.swing.JButton();
        btn_ModuleEditor = new javax.swing.JButton();
        btn_EventSequence = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        btn_CreatureMenu = new javax.swing.JButton();
        btn_NpcMenu = new javax.swing.JButton();
        btn_ItemMenu = new javax.swing.JButton();
        btn_SpellEditor = new javax.swing.JButton();
        btn_CurrencyList = new javax.swing.JButton();
        btn_DietyEditor = new javax.swing.JButton();
        btn_PantheonList = new javax.swing.JButton();
        btn_Races = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        btn_SpriteEditor = new javax.swing.JButton();
        btn_WallSetEditor = new javax.swing.JButton();
        btn_BackdropEditor = new javax.swing.JButton();
        btn_PortraitEditor = new javax.swing.JButton();
        btn_SoundList = new javax.swing.JButton();
        btn_SkinEditor = new javax.swing.JButton();
        pnl_Player2 = new javax.swing.JPanel();
        btn_Character2 = new javax.swing.JButton();
        btn_BeginPlaying2 = new javax.swing.JButton();
        btn_UserSettings2 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();

        jScrollPane1.setBorder(null);
        jScrollPane1.setOpaque(false);

        jTextPane1.setBackground(new java.awt.Color(0, 0, 0));
        jTextPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jTextPane1.setEditable(false);
        jTextPane1.setForeground(new java.awt.Color(255, 255, 255));
        jTextPane1.setText("Some options will not be available until you select or create a design!");
        jTextPane1.setMargin(new java.awt.Insets(10, 10, 10, 10));
        jScrollPane1.setViewportView(jTextPane1);

        jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.LEFT);
        jTabbedPane1.setPreferredSize(new java.awt.Dimension(614, 399));

        btn_QuestMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/layout_edit.png"))); // NOI18N
        btn_QuestMenu.setText("Quest Editor");
        btn_QuestMenu.setToolTipText("Create, Modify or Delete a Quest");
        btn_QuestMenu.setEnabled(false);
        btn_QuestMenu.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_QuestMenu.setMaximumSize(new java.awt.Dimension(100, 30));
        btn_QuestMenu.setMinimumSize(new java.awt.Dimension(100, 30));
        btn_QuestMenu.setPreferredSize(new java.awt.Dimension(100, 30));
        btn_QuestMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_QuestMenuActionPerformed(evt);
            }
        });

        btn_SelectDesign.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/brick.png"))); // NOI18N
        btn_SelectDesign.setText("Design Editor");
        btn_SelectDesign.setToolTipText("Create, Modify or Delete a Design");
        btn_SelectDesign.setEnabled(false);
        btn_SelectDesign.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_SelectDesign.setMaximumSize(new java.awt.Dimension(100, 30));
        btn_SelectDesign.setMinimumSize(new java.awt.Dimension(100, 30));
        btn_SelectDesign.setPreferredSize(new java.awt.Dimension(100, 30));
        btn_SelectDesign.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_SelectDesignActionPerformed(evt);
            }
        });

        btn_EventMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/lightning.png"))); // NOI18N
        btn_EventMenu.setText("Event Editor");
        btn_EventMenu.setToolTipText("Create, Modify or Delete an Event");
        btn_EventMenu.setEnabled(false);
        btn_EventMenu.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_EventMenu.setMaximumSize(new java.awt.Dimension(100, 30));
        btn_EventMenu.setMinimumSize(new java.awt.Dimension(100, 30));
        btn_EventMenu.setPreferredSize(new java.awt.Dimension(100, 30));
        btn_EventMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_EventMenuActionPerformed(evt);
            }
        });

        btn_BattleMapEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/map.png"))); // NOI18N
        btn_BattleMapEditor.setText("Battle Map Editor");
        btn_BattleMapEditor.setToolTipText("Create, Modify or Delete a Battle Map");
        btn_BattleMapEditor.setEnabled(false);
        btn_BattleMapEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_BattleMapEditor.setMaximumSize(new java.awt.Dimension(100, 30));
        btn_BattleMapEditor.setMinimumSize(new java.awt.Dimension(100, 30));
        btn_BattleMapEditor.setPreferredSize(new java.awt.Dimension(100, 30));
        btn_BattleMapEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_BattleMapEditorActionPerformed(evt);
            }
        });

        btn_ModuleEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/bricks.png"))); // NOI18N
        btn_ModuleEditor.setText("Level Editor");
        btn_ModuleEditor.setToolTipText("Create, Modify or Delete a Module");
        btn_ModuleEditor.setEnabled(false);
        btn_ModuleEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_ModuleEditor.setMaximumSize(new java.awt.Dimension(100, 30));
        btn_ModuleEditor.setMinimumSize(new java.awt.Dimension(100, 30));
        btn_ModuleEditor.setPreferredSize(new java.awt.Dimension(100, 30));
        btn_ModuleEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_ModuleEditorActionPerformed(evt);
            }
        });

        btn_EventSequence.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/lightning_add.png"))); // NOI18N
        btn_EventSequence.setText("Event Sequence Editor");
        btn_EventSequence.setEnabled(false);
        btn_EventSequence.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_EventSequence.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_EventSequenceActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout pnl_EditorLayout = new org.jdesktop.layout.GroupLayout(pnl_Editor);
        pnl_Editor.setLayout(pnl_EditorLayout);
        pnl_EditorLayout.setHorizontalGroup(
            pnl_EditorLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnl_EditorLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnl_EditorLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(btn_SelectDesign, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btn_ModuleEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btn_EventMenu, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnl_EditorLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(btn_QuestMenu, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                    .add(btn_BattleMapEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                    .add(btn_EventSequence, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnl_EditorLayout.setVerticalGroup(
            pnl_EditorLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnl_EditorLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnl_EditorLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btn_SelectDesign, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_EventSequence, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnl_EditorLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btn_ModuleEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_BattleMapEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnl_EditorLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btn_EventMenu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_QuestMenu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(143, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Game Design", pnl_Editor);

        btn_CreatureMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/bug.png"))); // NOI18N
        btn_CreatureMenu.setText("Creature Editor");
        btn_CreatureMenu.setToolTipText("Create, Modify or Delete a Creature");
        btn_CreatureMenu.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_CreatureMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_CreatureMenuActionPerformed(evt);
            }
        });

        btn_NpcMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/group.png"))); // NOI18N
        btn_NpcMenu.setText("NPC Editor");
        btn_NpcMenu.setToolTipText("Create, Modify or Delete an NPC");
        btn_NpcMenu.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_NpcMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_NpcMenuActionPerformed(evt);
            }
        });

        btn_ItemMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/shield.png"))); // NOI18N
        btn_ItemMenu.setText("Item Editor");
        btn_ItemMenu.setToolTipText("Create, Modify or Delete an Item");
        btn_ItemMenu.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_ItemMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_ItemMenuActionPerformed(evt);
            }
        });

        btn_SpellEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/book.png"))); // NOI18N
        btn_SpellEditor.setText("Spell Editor");
        btn_SpellEditor.setToolTipText("Create, Modify or Delete a Spell");
        btn_SpellEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_SpellEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_SpellEditorActionPerformed(evt);
            }
        });

        btn_CurrencyList.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/coins.png"))); // NOI18N
        btn_CurrencyList.setText("Currency Editor");
        btn_CurrencyList.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_CurrencyList.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_CurrencyListActionPerformed(evt);
            }
        });

        btn_DietyEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/cross.gif"))); // NOI18N
        btn_DietyEditor.setText("Diety Editor");
        btn_DietyEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_DietyEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_DietyEditorActionPerformed(evt);
            }
        });

        btn_PantheonList.setText("Pantheon Editor");
        btn_PantheonList.setEnabled(false);
        btn_PantheonList.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_PantheonList.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_PantheonListActionPerformed(evt);
            }
        });

        btn_Races.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/swordTest.gif"))); // NOI18N
        btn_Races.setText("Races");
        btn_Races.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_Races.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_RacesActionPerformed(evt);
            }
        });

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/scroll.gif"))); // NOI18N
        jButton2.setText("Classes");
        jButton2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jButton2.setPreferredSize(new java.awt.Dimension(105, 25));
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, btn_ItemMenu, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, btn_CreatureMenu, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, btn_NpcMenu, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, btn_SpellEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(btn_Races, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)
                    .add(btn_CurrencyList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)
                    .add(btn_DietyEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)
                    .add(btn_PantheonList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btn_SpellEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_Races, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(btn_CurrencyList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_ItemMenu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(btn_DietyEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_CreatureMenu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(btn_PantheonList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_NpcMenu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(71, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Data", jPanel1);

        btn_SpriteEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/picture.png"))); // NOI18N
        btn_SpriteEditor.setText("Sprite Editor");
        btn_SpriteEditor.setToolTipText("Create, Modify or Delete a Sprite");
        btn_SpriteEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_SpriteEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_SpriteEditorActionPerformed(evt);
            }
        });

        btn_WallSetEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/application_view_tile.png"))); // NOI18N
        btn_WallSetEditor.setText("Wallset Editor");
        btn_WallSetEditor.setToolTipText("Create, Modify or Delete a Wallset");
        btn_WallSetEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_WallSetEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_WallSetEditorActionPerformed(evt);
            }
        });

        btn_BackdropEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/application_view_gallery.png"))); // NOI18N
        btn_BackdropEditor.setText("Backdrop Editor");
        btn_BackdropEditor.setToolTipText("Create, Modify or Delete a Backdrop");
        btn_BackdropEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_BackdropEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_BackdropEditorActionPerformed(evt);
            }
        });

        btn_PortraitEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/photo.png"))); // NOI18N
        btn_PortraitEditor.setText("Portrait Editor");
        btn_PortraitEditor.setToolTipText("Create, Modify or Delete a Portrait");
        btn_PortraitEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_PortraitEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_PortraitEditorActionPerformed(evt);
            }
        });

        btn_SoundList.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/sound.png"))); // NOI18N
        btn_SoundList.setText("Sound Editor");
        btn_SoundList.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_SoundList.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_SoundListActionPerformed(evt);
            }
        });

        btn_SkinEditor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/layers.png"))); // NOI18N
        btn_SkinEditor.setText("Skin Editor");
        btn_SkinEditor.setToolTipText("Create, Modify or Delete a Skin");
        btn_SkinEditor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_SkinEditor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_SkinEditorActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, btn_BackdropEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, btn_WallSetEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .add(btn_SpriteEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(btn_SkinEditor, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
                    .add(btn_PortraitEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 265, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_SoundList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btn_SpriteEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_PortraitEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btn_WallSetEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_SoundList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btn_BackdropEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btn_SkinEditor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(143, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Images & Sounds", jPanel2);

        pnl_Player2.setBorder(javax.swing.BorderFactory.createTitledBorder("Player Options"));

        btn_Character2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/user.png"))); // NOI18N
        btn_Character2.setText("Character Menu");
        btn_Character2.setToolTipText("View, edit or create new characters");
        btn_Character2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_Character2.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        btn_Character2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_Character2ActionPerformed(evt);
            }
        });

        btn_BeginPlaying2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/brick_go.png"))); // NOI18N
        btn_BeginPlaying2.setText("Begin Playing");
        btn_BeginPlaying2.setToolTipText("Begin Playing Currently Selected Design");
        btn_BeginPlaying2.setEnabled(false);
        btn_BeginPlaying2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_BeginPlaying2.setMaximumSize(new java.awt.Dimension(100, 30));
        btn_BeginPlaying2.setMinimumSize(new java.awt.Dimension(100, 30));
        btn_BeginPlaying2.setPreferredSize(new java.awt.Dimension(100, 30));
        btn_BeginPlaying2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_BeginPlaying2ActionPerformed(evt);
            }
        });

        btn_UserSettings2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/cog.png"))); // NOI18N
        btn_UserSettings2.setText("User Settings");
        btn_UserSettings2.setToolTipText("Change User Settings");
        btn_UserSettings2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        btn_UserSettings2.setMaximumSize(new java.awt.Dimension(100, 30));
        btn_UserSettings2.setMinimumSize(new java.awt.Dimension(100, 30));
        btn_UserSettings2.setPreferredSize(new java.awt.Dimension(100, 30));

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/disk.png"))); // NOI18N
        jButton1.setText("Load Design");
        jButton1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout pnl_Player2Layout = new org.jdesktop.layout.GroupLayout(pnl_Player2);
        pnl_Player2.setLayout(pnl_Player2Layout);
        pnl_Player2Layout.setHorizontalGroup(
            pnl_Player2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnl_Player2Layout.createSequentialGroup()
                .addContainerGap()
                .add(pnl_Player2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(btn_Character2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .add(btn_UserSettings2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .add(btn_BeginPlaying2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnl_Player2Layout.setVerticalGroup(
            pnl_Player2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnl_Player2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btn_Character2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btn_BeginPlaying2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 81, Short.MAX_VALUE)
                .add(btn_UserSettings2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 719, Short.MAX_VALUE)
                    .add(layout.createSequentialGroup()
                        .add(pnl_Player2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 547, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE)
                    .add(pnl_Player2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btn_RacesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_RacesActionPerformed
        PanelSwapper.swap(new pnl_RacesList(), this);
    }//GEN-LAST:event_btn_RacesActionPerformed
    
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        
        //TODO:  Add code to load from a list of saved designs in the database
        EditorMain.setDesignName("Test Design");
        EditorMain.setDesignId(1);
        jTextPane1.setText("Currently Loaded Design:" + EditorMain.getDesignName());
        btn_BackdropEditor.setEnabled(true);
        btn_BattleMapEditor.setEnabled(true);
        btn_BeginPlaying2.setEnabled(true);
        btn_Character2.setEnabled(true);
        btn_CreatureMenu.setEnabled(true);
        btn_CurrencyList.setEnabled(true);
        btn_DietyEditor.setEnabled(true);
        btn_EventMenu.setEnabled(true);
        btn_EventSequence.setEnabled(true);
        btn_ItemMenu.setEnabled(true);
        btn_ModuleEditor.setEnabled(true);
        btn_NpcMenu.setEnabled(true);
        btn_PantheonList.setEnabled(true);
        btn_PortraitEditor.setEnabled(true);
        btn_QuestMenu.setEnabled(true);
        btn_SelectDesign.setEnabled(true);
        btn_SkinEditor.setEnabled(true);
        btn_SoundList.setEnabled(true);
        btn_SpellEditor.setEnabled(true);
        btn_SpriteEditor.setEnabled(true);
        btn_UserSettings2.setEnabled(true);
        btn_WallSetEditor.setEnabled(true);
        
    }//GEN-LAST:event_jButton1ActionPerformed
    
    private void btn_BeginPlaying2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_BeginPlaying2ActionPerformed
        PanelSwapper.swap(new MainScreen(), this);
        if (GenericFlags.warningMessages) {
            log.warn("Swapping the Editor Panel for the Game Panel");
        }
    }//GEN-LAST:event_btn_BeginPlaying2ActionPerformed
    
    private void btn_SelectDesignActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_SelectDesignActionPerformed
        PanelSwapper.swap(new DesignForm(), this);
    }//GEN-LAST:event_btn_SelectDesignActionPerformed
    
    private void btn_SkinEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_SkinEditorActionPerformed
        PanelSwapper.swap(new SkinList(), this);
        if (GenericFlags.warningMessages) {
            log.warn("Swapping the skin editor panel");
        }
    }//GEN-LAST:event_btn_SkinEditorActionPerformed
    
    private void btn_SoundListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_SoundListActionPerformed
        
    }//GEN-LAST:event_btn_SoundListActionPerformed
    
    private void btn_PortraitEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_PortraitEditorActionPerformed
        PanelSwapper.swap(new PortraitList(), this);
    }//GEN-LAST:event_btn_PortraitEditorActionPerformed
    
    private void btn_BackdropEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_BackdropEditorActionPerformed
        PanelSwapper.swap(new BackdropList(), this);
    }//GEN-LAST:event_btn_BackdropEditorActionPerformed
    
    private void btn_WallSetEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_WallSetEditorActionPerformed
        PanelSwapper.swap(new pnl_WallList(), this);
    }//GEN-LAST:event_btn_WallSetEditorActionPerformed
    
    private void btn_SpriteEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_SpriteEditorActionPerformed
        PanelSwapper.swap(new SpriteList(), this);
    }//GEN-LAST:event_btn_SpriteEditorActionPerformed
    
    private void btn_PantheonListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_PantheonListActionPerformed
        PanelSwapper.swap(new PantheonList(), this);
    }//GEN-LAST:event_btn_PantheonListActionPerformed
    
    private void btn_DietyEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_DietyEditorActionPerformed
        PanelSwapper.swap(new pnl_DietyList(), this);
    }//GEN-LAST:event_btn_DietyEditorActionPerformed
    
    private void btn_CurrencyListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_CurrencyListActionPerformed
        PanelSwapper.swap(new CurrencyList(), this);
    }//GEN-LAST:event_btn_CurrencyListActionPerformed
    
    private void btn_QuestMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_QuestMenuActionPerformed
        PanelSwapper.swap(new QuestList(), this);
    }//GEN-LAST:event_btn_QuestMenuActionPerformed
    
    private void btn_BattleMapEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_BattleMapEditorActionPerformed
        PanelSwapper.swap(new BattleMapList(), this);
    }//GEN-LAST:event_btn_BattleMapEditorActionPerformed
    
    private void btn_EventSequenceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_EventSequenceActionPerformed
        PanelSwapper.swap(new EventSequenceForm(), this);
    }//GEN-LAST:event_btn_EventSequenceActionPerformed
    
    private void btn_EventMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_EventMenuActionPerformed
        PanelSwapper.swap(new EventList(), this);
    }//GEN-LAST:event_btn_EventMenuActionPerformed
    
    private void btn_SpellEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_SpellEditorActionPerformed
        PanelSwapper.swap(new pnl_SpellList(), this);
    }//GEN-LAST:event_btn_SpellEditorActionPerformed
    
    private void btn_ModuleEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_ModuleEditorActionPerformed
        PanelSwapper.swap(new pnl_ModuleList(), this);
    }//GEN-LAST:event_btn_ModuleEditorActionPerformed
    
    private void btn_NpcMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_NpcMenuActionPerformed
        PanelSwapper.swap(new pnl_NPCList(), this);
    }//GEN-LAST:event_btn_NpcMenuActionPerformed
    
    private void btn_ItemMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_ItemMenuActionPerformed
        PanelSwapper.swap(new pnl_ItemList(), this);
    }//GEN-LAST:event_btn_ItemMenuActionPerformed
    
    private void btn_CreatureMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_CreatureMenuActionPerformed
        PanelSwapper.swap(new pnl_CreatureList(), this);
    }//GEN-LAST:event_btn_CreatureMenuActionPerformed
    
    private void btn_Character2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_Character2ActionPerformed
        PanelSwapper.swap(new pnl_CharacterList(), this);
    }//GEN-LAST:event_btn_Character2ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        PanelSwapper.swap(new pnl_ClassesList(), this);
    }//GEN-LAST:event_jButton2ActionPerformed
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btn_BackdropEditor;
    private javax.swing.JButton btn_BattleMapEditor;
    private javax.swing.JButton btn_BeginPlaying2;
    private javax.swing.JButton btn_Character2;
    private javax.swing.JButton btn_CreatureMenu;
    private javax.swing.JButton btn_CurrencyList;
    private javax.swing.JButton btn_DietyEditor;
    private javax.swing.JButton btn_EventMenu;
    private javax.swing.JButton btn_EventSequence;
    private javax.swing.JButton btn_ItemMenu;
    private javax.swing.JButton btn_ModuleEditor;
    private javax.swing.JButton btn_NpcMenu;
    private javax.swing.JButton btn_PantheonList;
    private javax.swing.JButton btn_PortraitEditor;
    private javax.swing.JButton btn_QuestMenu;
    private javax.swing.JButton btn_Races;
    private javax.swing.JButton btn_SelectDesign;
    private javax.swing.JButton btn_SkinEditor;
    private javax.swing.JButton btn_SoundList;
    private javax.swing.JButton btn_SpellEditor;
    private javax.swing.JButton btn_SpriteEditor;
    private javax.swing.JButton btn_UserSettings2;
    private javax.swing.JButton btn_WallSetEditor;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextPane jTextPane1;
    private javax.swing.JPanel pnl_Editor;
    private javax.swing.JPanel pnl_Player2;
    // End of variables declaration//GEN-END:variables
    
}
